import request from '/@/utils/request';

// 查询设备列列表
export function listDevices(query?: Object) {
  return request({
    url: '/module/devices/list',
    method: 'get',
    params: query
  })
}

// 查询设备列详细
export function getDevices(id?: number) {
  return request({
    url: '/module/devices/' + id,
    method: 'get'
  })
}

// 新增设备列
export function addDevices(data?: Object) {
  return request({
    url: '/module/devices',
    method: 'post',
    data: data
  })
}

// 修改设备列
export function updateDevices(data?: Object) {
  return request({
    url: '/module/devices',
    method: 'put',
    data: data
  })
}

// 删除设备列
export function delDevices(id?: number) {
  return request({
    url: '/module/devices/' + id,
    method: 'delete'
  })
}

// 导出设备列
export function exportDevices(query?: Object) {
  return request({
    url: '/module/devices/export',
    method: 'get',
    params: query
  })
}

// 重置二维码
export function resetQrCode(data?: Object) {
  return request({
    url: '/module/devices/resetQrCode',
    method: 'post',
    data: data
  })
}

